using System;
using System.Collections.Generic;
using ContentRenderingApi.NodeData;

namespace ContentRenderingApi.Node
{
    /// <summary/>
    internal abstract class AbstractTagNode : AbstractContainerNode
    {
        private AbstractNodeData _nodeData;

        /// <summary/>
        internal AbstractTagNode(
            AbstractNode parent,
            AbstractNodeData nodeData)
            : base(parent) 
        {
            this._nodeData = nodeData;
        }

        /// <summary/>
        internal override bool IsParentTag()
        {
            return this._nodeData.IsParent();
        }

        /// <summary/>
        internal override bool IsRootTag()
        {
            return this._nodeData.IsRoot();
        }

        /// <summary/>
        internal override bool IsChildTag()
        {
            return this._nodeData.IsChild();
        }

        /// <summary/>
        internal override string Name
        {
            get { return this._nodeData.Name; }
        }

        /// <summary/>
        internal override int ParentLevel
        {
            get { return this._nodeData.ParentLevel; }
        }
    }
}
